Tool Results
Every tool execution in BindAI produces a Tool Result. A Tool Result represents the outcome of a tool invocation and provides a consistent interface for successful executions, failures, and returned data. Instead of interacting directly with raw Python return values, the execution pipeline works with tool results.Why Tool Results?
Tool Results provide a standard format for tool execution. Benefits include:- consistent execution behavior
- predictable error handling
- provider-independent integration
- workflow compatibility
- easier debugging
Successful Execution
When a tool completes successfully, its output becomes available to the execution pipeline. Example:- success status
- output value
Failed Execution
If a tool cannot complete its task, the result contains an error instead of an output. Example:Result Structure
Conceptually, a Tool Result contains:Successful Result
Example:Failed Result
Example:- retry
- call another tool
- explain the error to the user
Returning Objects
Tools may return structured Python objects. Example:Returning Lists
Lists are also supported.Returning Numbers
Simple values work naturally.Using Tool Results in Workflows
Workflow nodes can store tool outputs as variables.Using Tool Results in Agents
Agents receive tool outputs automatically. Example:Error Recovery
Tool Results make recovery straightforward. Instead of terminating execution immediately, BindAI can:- retry the tool
- execute an alternative tool
- continue the workflow
- return a graceful error message
Logging
Tool Results are also useful for logging. Typical information includes:- execution time
- success or failure
- returned output
- error details
Best Practices
- Return clear, predictable values.
- Prefer structured objects for complex data.
- Keep outputs reasonably small.
- Handle expected failures inside the tool.
- Let unexpected exceptions surface when appropriate.
- Write tools that produce deterministic results whenever possible.
